fix: use decodeURIComponent in openFile #5504
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes copyLink function for the files and folder with special character in their name
Related GitHub Issue
Closes: #4687
Roo Code Task Context (Optional)
NA
Description
passing filePath to decodeURIComponent to correctly decode special characters like "["
Why: This was breaking openFile functionality where folder/file name contains special character.
Test Procedure
Created a sample directory similar with following files
Prompt Roo Code in code mode to "response me with all the file in the project"
This will list files tst.txt and test2.txt both should open correctly on clicking. Verified this.
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Additional Notes
Get in Touch
Important
Fixes
openFileinopen-file.tsto handle special characters in file paths usingdecodeURIComponent.openFilefunction inopen-file.tsto correctly handle file paths with special characters by usingdecodeURIComponent.[can be opened correctly.This description was created by
for afdff30. You can customize this summary. It will automatically update as commits are pushed.